<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .blue{
            background: blue;
        }
    </style>
    <script>
    window.onload = function(){
        var lis = document.getElementsByClassName("l1");
        for(var i = 0;i<lis.length;i++){
            lis[i].onmouseover = function(){
                this.style.background = "blue"
            }
        }
    }
    </script>
</head>
<body>
    <ul>
        <li class="l1">的萨达萨达</li>
        <li class="l1">的萨达萨达</li>
        <li class="l1">的萨达萨达</li>
        <li class="l1">的萨达萨达</li>
        <li class="l1">的萨达萨达</li>
        <li class="l1">的萨达萨达</li>
    </ul>
    
</body>
</html>